This test was failing in continuous, where the tests are running
in a VM with disabled animations. Make the test adapt to that
situation by changing the rui on the fly if we find that animations
are disabled.
return FALSE;
}
+
+G_MODULE_EXPORT gboolean
+add_reference_class_if_no_animation (GtkWidget *widget)
+{
+ gboolean enabled;
+ GtkStyleContext *context;
+
+ g_object_get (gtk_widget_get_settings (widget), "gtk-enable-animations", &enabled, NULL);
+ if (enabled)
+ return FALSE;
+
+ g_message ("Adding reference class because animation is disabled");
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_add_class (context, "reference");
+
+ return FALSE;
+}
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello World</property>
+ <signal name="map" handler="reftest:add_reference_class_if_no_animation" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>